/**------------------------ 白名单分页器 ------------------------*/
axios
    .get('/d/whitelist')
    .then(function(response){
      make_whpage(response.data.ListLength,response.data.whitelist)
    })
function make_whpage(datanum,data){
  layui.use('laypage', function(){
    var laypage = layui.laypage;
    //将一段数组分页展示
    
    //调用分页
    laypage.render({
      elem: 'page_wh',
      count: datanum,
      theme:'#337AB7',
      limit:15,
      jump:function(obj,first){
        if(first){
          wh_vue.broadcasts = data.slice(0,15);
        }else{
          wh_vue.broadcasts = data.slice((15*obj.curr-15),15*obj.curr);
        }
      }
    });
  });
}
/**------------------------- 移动端分页器 -----------------------*/
axios
  .get("/d/control")
  .then(function(response){
    make_mopage(response.data.mobile_length,response.data.data)
  })
function make_mopage(datanum,data){
  layui.use('laypage', function(){
    var laypage = layui.laypage;
    //调用分页
    laypage.render({
      elem: 'pg_mobile',
      count: datanum,
      theme:'#337AB7',
      limit:5,
      jump:function(obj,first){
        if(first){
          vue_mobile.mobile_list = data.slice(0,5);
        }else{
          vue_mobile.mobile_list = data.slice((5*obj.curr-5),5*obj.curr);
        }
      }
    });
  });
}